<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  请输入速度：<input type="text" id="speed">
  <button id="start-button" type="button">开始</button>
</body>
<script>
  var speed = document.getElementById('speed').value
  console.log(speed);
</script>

</html>